﻿<ResourceDictionary
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" 
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:d="http://schemas.microsoft.com/expression/blend/2008" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="d">
	<Style x:Key="ToolsControlStyle" TargetType="{x:Type ItemsControl}">
		<Setter Property="Template">
			<Setter.Value>
				<ControlTemplate TargetType="{x:Type ItemsControl}">
					<Border BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
						<ItemsPresenter SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
					</Border>
				</ControlTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="ItemsPanel">
			<Setter.Value>
				<ItemsPanelTemplate>
					<WrapPanel IsItemsHost="True"/>
				</ItemsPanelTemplate>
			</Setter.Value>
		</Setter>
		<Setter Property="ItemTemplate">
			<Setter.Value>
				<DataTemplate>
					<Grid Height="100" Margin="4" Width="100">
						<Button Content="{Binding Key, Mode=OneWay}" CommandParameter="{Binding Value, Mode=OneWay}" Command="ApplicationCommands.New" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" d:LayoutOverrides="Height" Cursor="Hand"/>
					</Grid>
				</DataTemplate>
			</Setter.Value>
		</Setter>
	</Style>
	<!-- 应该在此定义资源字典条目。-->
</ResourceDictionary>